Program TestBaseRTL;

{$APPTYPE CONSOLE}
ThreadVar I: Integer;

Procedure DLLLog; External 'TestBaseDLL.dll';

Var
 S: String;

ResourceString
 STRTest = '123';

BEGIN
 Try
  Try
   Try
    //S:= STRTest; // Unimplemented exception
    DLLLog; // Divide-by-zero
   Finally
    // Will leave a warning saying no in exception processing context
    LogException('XD0');
    // Except in Finally
    Error(reHardware);
   END;
  Except
   LogException('XD1');
   Raise;
  END;
 Except
  LogException('XD2');
  // Except in Except
  I:= I DIV (I - I);
 END;
// Shoud catch the exception and display error
// Will cause another unimplemented exception when cleaning S
END.
